<?php
namespace app\index\controller;
use app\index\controller\Base;
use think\Db;

class Article extends Base
{
    public function index()
    {
        $id = input('id');
        $click = Db('article')->where(array('id'=>$id))->setInc('click');//点击量
        $article = Db('article')->where(array('id'=>$id))->find();//当前文章
        $this->assign('article',$article);
        $this->assign('click',$click);
        return view();
    }
}